An all-or-nothing mentality is a cognitive pattern where individuals view situations in black-and-white terms, believing that things are either completely successful or a total failure, with no middle ground or shades of gray. This mindset can lead to extreme behaviors and unrealistic expectations.